import request from '@/utils/request'

export function getTreemenuList(data) {
  return request({
    url: '/api/user/menu/getMenuTreeData',
    method: 'post',
    data: data
  })
}

export function getMenuResourceTreeData(data) {
  return request({
    url: '/api/user/menu/getMenuResourceTreeData',
    method: 'post',
    data: data
  })
}

export function getMenuDetail(data) {
  return request({
    url: '/api/user/menu/getMenuDetail',
    method: 'post',
    data: data
  })
}

export function addMenu(data) {
  return request({
    url: '/api/user/menu/saveUcMenu',
    method: 'post',
    data: data
  })
}

export function delMenu(data) {
  return request({
    url: '/api/user/menu/deleteUcMenu',
    method: 'post',
    data: data
  })
}

export function updateMenu(data) {
  return request({
    url: '/api/user/menu/updateUcMenu',
    method: 'post',
    data: data
  })
}

export function getMenusByUserId(data) {
  return request({
    url: '/api/user/menu/getMenusByUserId',
    method: 'post',
    data: data
  })
}

